package cn.gyouzhe;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import org.springframework.context.ApplicationContext;

/**
 * 应用资源持有器
 *
 * @author wangchuan
 * @datetime 2018/2/25 21:57
 */
public class AppHolder {
    @Getter
    @Setter(AccessLevel.MODULE)
    private ApplicationContext applicationContext;


    private AppHolder() {
    }

    private static class InstanceHolder {
        static AppHolder instance = new AppHolder();
    }

    public static AppHolder getInstance() {
        return InstanceHolder.instance;
    }

}
